﻿<%@ WebHandler Language="C#" Class="Handler" %>

using System;
using System.Web;
using BusinessObjects.BO_GetObjects;
using DigiLib;

public class Handler : IHttpHandler
{
    private string action, data = string.Empty;

    public void ProcessRequest(HttpContext context)
    {
        action = context.Request["action"].ToString();
        data = context.Request["data"].ToString();
        switch (action)
        {
            case "log":
                //string url = "http://www.geobytes.com/IpLocator.htm?GetLocation&template=php3.txt&IpAddress=" + context.Request.ServerVariables["REMOTE_ADDR"].ToString()                
                BO_portal_guest_log.Insert(data, DateTime.Now, context.Request.ServerVariables["REMOTE_ADDR"].ToString(), "Hà nội");
                break;
            default:
                break;
        }
    }

    public bool IsReusable
    {
        get
        {
            return false;
        }
    }
}